<?php
include_once('common/header.php');
if($AppUI->id > 0) {
	Vfriend_Function::redirect(HOST_VFRIEND);
}
$strHexUserId	= $objRequest->getParam('pu', '');
$strExpireTime	= $objRequest->getParam('pt', '');
$intHexUserId	= 0;
$intExpireTime	= 0;
$intCurrentTime	= time();
$intError		= 0;
if($strHexUserId) $intHexUserId = Vfriend_Function::base64D($strHexUserId);
if($strExpireTime) $intExpireTime = Vfriend_Function::base64D($strExpireTime);
if($intCurrentTime > $intExpireTime) {
	$intError	= 9;
}
if($intHexUserId == 0 || $intCurrentTime == 0) {
	$intError	= 10;
}
if($intError == 0) {
	$objVfriendUser	= new Vfriend_User();	
	$objUser		= $objVfriendUser->getInfoByHexUserId($intHexUserId);
	if(!$objUser) {
		$intError	= 10;
	}	
	$this->view->objUser = $objUser;
}
else
	Vfriend_Function::redirect(LINK_INDEX_FORGET_PASSWORD . '?err=' . $intError);
?>